#include <string>
#include "mkahypar/utils/typedef.h"
#include "mkahypar/utils/macros.h"
#include "mkahypar/datastructure/hypergraph.h"
#include "mkahypar/io/hypergraph_io.h"
#include "mkahypar/io/fast_io.h"
#include "mkahypar/partition/context.h"
#include "mkahypar/utils/timer.h"
#include "mkahypar/partitioner_facade.h"

// ./partitioner -t caseDir -s output
int main(int argc, char* argv[]){
  mkahypar::Context::getInstance().inputPath = argv[2];
  mkahypar::Context::getInstance().outputPath = argv[4];

  LOG << mkahypar::Context::getInstance().inputPath<<mkahypar::Context::getInstance().outputPath;


  mkahypar::Hypergraph hypergraph;

  mkahypar::ds::FPGAGraph topo;


  mkahypar::Timer::getInstance().setTime(300);
//    mkahypar::io::createHypergraphFromFile(mkahypar::Context::getInstance().inputPath + "/design.are",
//                                         mkahypar::Context::getInstance().inputPath + "/design.net",
//                                         mkahypar::Context::getInstance().inputPath + "/design.info",
//                                         mkahypar::Context::getInstance().inputPath + "/design.topo",
//                                         hypergraph);

  mkahypar::fastIO::createHypergraphFromFile(mkahypar::Context::getInstance().inputPath + "/design.are",
                                         mkahypar::Context::getInstance().inputPath + "/design.net",
                                         mkahypar::Context::getInstance().inputPath + "/design.info",
                                         mkahypar::Context::getInstance().inputPath + "/design.topo",
                                         hypergraph,topo);
  LOG<<"read finish cost time"<<mkahypar::Timer::getInstance().getCostTime();

  mkahypar::PartitionerFacade().partition(hypergraph,topo);
  //打印结果
  mkahypar::fastIO::printPartitionResult(hypergraph,topo);

  return  0;


}